<?php
class IndexAction extends Action {
	
	public function _empty($name){
	$str="/YiCms/Tpl/Home/".C('DEFAULT_THEME')."/Public/";
	$this->assign('style',$str);
		$this->assign('web',webconfig());
		if($name=='index'){
			$style=C('homestyle');		
		}elseif($name=='list'){			
			$data=style();
			$p=(int)$_GET['p'];	
			if($p != 0){
				$data['pagenum']='-第'.$p.'页-';				
			}else{
				$data['pagenum']='-频道页-';	
			}		
			$style=$data['listname'];
			$this->assign('listinfo',$data);	
		}elseif($name=='tag'){
			$data['name']=strip_tags($_GET['name']);
if($data['name'] !== iconv('UTF-8','UTF-8',iconv('UTF-8','UTF-8',$data['name']))) $data['name'] =  iconv('GBK','UTF-8',$data['name']);
			$this->assign('taginfo',$data);	
		}
		$this->display($style);
	}
	function suggest(){
		$data['content']=$this->_post('content','strip_tags');
		$data['time']=time();
		$data['ip']=get_client_ip();
		if(M('suggest')->add($data)){
			$this->success('发送成功','/');
		}
	}
}
?>